<template>
    <view class="swiperf">
        <view class="uni-padding-wrap">
            <view class="page-section swiper">
                <view class="page-section-spacing">
                    <swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
                        <swiper-item v-for="item of list" :key="item.id">
                            <img :src="item.imgUrl" alt="" class="swiper-img" mode="widthFix">
                        </swiper-item>
                    </swiper>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
	export default {
		name: 'HomeSwiper',
		props: {
			list: Array
		},
	    data() {
	        return {
	            indicatorDots: true,
	            autoplay: true,
	            interval: 5000,
	            duration: 500
	        }
	    }
	}
</script>

<style>
	.swiperf{
		width:100%;
		height:100%;
	}
	.swiper-img{
		width:100%;
	}
	.swiper{
		height:275rpx;
	}
</style>
